
package interface_grafica;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import listeners.ListenersTelaEdicaoDoacao;
import listeners.ListenersTelaEdicaoProjetos;
import listeners.ListenersTelaEdicaoSocio;

public class TelaEdicaoProjetos extends javax.swing.JPanel {
    
    private static TelaEdicaoProjetos instance;

    public static TelaEdicaoProjetos getInstance() {
        if (instance == null) {
            instance = new TelaEdicaoProjetos();
        }
        return instance;
    }     
    
    public TelaEdicaoProjetos() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        status = new javax.swing.JComboBox();
        jLabel1 = new javax.swing.JLabel();
        nomeProjeto = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        idProjeto = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        dataInicioProjeto = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        dataFimProjeto = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        realizadoresProjeto = new javax.swing.JTextArea();
        jScrollPane2 = new javax.swing.JScrollPane();
        resumoProjeto = new javax.swing.JTextArea();
        jLabel4 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        btCancelar = new javax.swing.JButton();
        btSalvar = new javax.swing.JButton();
        btRemover = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();

        setPreferredSize(new java.awt.Dimension(1063, 557));

        status.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        status.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Aberto", "Cancelado", "Concluído" }));

        jLabel1.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel1.setText("ID");

        nomeProjeto.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel3.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel3.setText("Data de inicio");

        idProjeto.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel2.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel2.setText("Nome");

        dataInicioProjeto.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel6.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel6.setText("Nome dos realizadores");

        dataFimProjeto.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel14.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel14.setText("Data de fim");

        realizadoresProjeto.setColumns(20);
        realizadoresProjeto.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        realizadoresProjeto.setRows(5);
        jScrollPane1.setViewportView(realizadoresProjeto);

        resumoProjeto.setColumns(20);
        resumoProjeto.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        resumoProjeto.setRows(5);
        jScrollPane2.setViewportView(resumoProjeto);

        jLabel4.setText("Status");

        jLabel15.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel15.setText("Resumo breve");

        btSalvar.setText("Salvar");
        btSalvar.addActionListener(new ListenersTelaEdicaoProjetos());

        btRemover.setText("Remover");
        btRemover.addActionListener(new ListenersTelaEdicaoProjetos());

        btCancelar.setText("Cancelar");
        btCancelar.addActionListener(new ListenersTelaEdicaoProjetos());

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel5.setText("Edicao de Projetos");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel15)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 740, Short.MAX_VALUE)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btSalvar))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btRemover)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btCancelar))
                    .addComponent(jLabel6)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(dataInicioProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3))
                        .addGap(94, 94, 94)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel14)
                            .addComponent(dataFimProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(idProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1))
                        .addGap(39, 39, 39)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(nomeProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, 377, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(75, 75, 75))
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(459, 459, 459)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(status, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(466, 466, 466)
                        .addComponent(jLabel5)))
                .addContainerGap(430, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(28, 28, 28)
                .addComponent(jLabel5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(idProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nomeProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jLabel14)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(dataInicioProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(dataFimProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(status, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel15)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btCancelar)
                    .addComponent(btRemover)
                    .addComponent(btSalvar))
                .addGap(26, 26, 26))
        );
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btCancelar;
    private javax.swing.JButton btRemover;
    private javax.swing.JButton btSalvar;
    private javax.swing.JTextField dataFimProjeto;
    private javax.swing.JTextField dataInicioProjeto;
    private javax.swing.JTextField idProjeto;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTextField nomeProjeto;
    private javax.swing.JTextArea realizadoresProjeto;
    private javax.swing.JTextArea resumoProjeto;
    private javax.swing.JComboBox status;
    // End of variables declaration//GEN-END:variables

 public JButton getBtCancelar() {
        return btCancelar;
    }

    public String getDataFimProjeto() {
        return dataFimProjeto.getText();
    }

    public String getDataInicioProjeto() {
        return dataInicioProjeto.getText();
    }

    public String getIdProjeto() {
        return idProjeto.getText();
    }

    public String getNomeProjeto() {
        return nomeProjeto.getText();
    }

    public String getRealizadoresProjeto() {
        return realizadoresProjeto.getText();
    }

    public String getResumoProjeto() {
        return resumoProjeto.getText();
    }

    public JComboBox getStatus() {
        return status;
    }

    public JButton getBtRemover() {
        return btRemover;
    }

    public JButton getBtSalvar() {
        return btSalvar;
    }

    public void setDataFimProjeto(String dataFimProjeto) {
        this.dataFimProjeto.setText(dataFimProjeto);
    }

    public void setDataInicioProjeto(String dataInicioProjeto) {
        this.dataInicioProjeto.setText(dataInicioProjeto);
    }

    public void setIdProjeto(String idProjeto) {
        this.idProjeto.setText(idProjeto);
    }

    public void setNomeProjeto(String nomeProjeto) {
        this.nomeProjeto.setText(nomeProjeto);
    }

    public void setRealizadoresProjeto(String realizadoresProjeto) {
        this.realizadoresProjeto.setText(realizadoresProjeto);
    }

    public void setResumoProjeto(String resumoProjeto) {
        this.resumoProjeto.setText(resumoProjeto);
    }

    public void setStatus(JComboBox status) {
        this.status = status;
    }
    
}
